package com.ihrm.system.mapper;

import com.ihrm.domain.system.User;
import com.ihrm.domain.system.UserExample;

import java.util.List;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;


/**
 * @author chentao
 */
@Mapper
@Repository
public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(String id);

    int insert(User record);

    int insertSelective(User record);

    User selectByExample(UserExample example);

    User selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> getUserList(@Param("companyId") String companyId, @Param("departmentId") String departmentId);

    User selectUserAndRoleByPrimaryKey(@Param("id") String id);

    List<User> findAll(@Param("companyId") String companyId);


}